var app = angular.module('HelpConnect', ['ui']);

app.controller('HelpConnect', function($scope){

  $scope.places = {
    QUEZON_CITY: 1,
    LAS_PINAS:   2,
    MAKATI:      3,
    TACLOBAN:    4
  };

  $scope.currentUser = {
    name: "YourName",
    location: $scope.places.QUEZON_CITY
  };

  $scope.deleteEntry = function(entry){
    alert("Deleting " + entry.name + "'s entry!");
  };

  $scope.flagEntry = function(entry){
    alert("Flagging " + entry.name + "'s entry!");
  };

  $scope.entries = [];

  $scope.entries.push({
    offer: true,
    name: "A B",
    contact: 'Lorem ipsum dolor.',
    location: "Lorem ipsum dolor.",
    details: "I have 203329043209423 Pesos."
  });

  $scope.entries.push({
    offer: false,
    name: "Content goes here.",
    contact: 'Lorem ipsum.',
    location: "Makati",
    details: "I have lots of money"
  });

  $scope.entries.push({
    offer: false,
    name: "Content goes here.",
    contact: 'Lorem ipsum dolor.',
    location: "Quezon City",
    details: "I have lots of money"
  });

  $scope.entries.push({
    offer: true,
    name: "Content goes here.",
    contact: 'Lorem ipsum dolor.',
    location: "Marikina",
    details: "I am offering a plane to go to Tacloban."
  });

  $scope.entries.push({
    offer: false,
    name: "Content goes here.",
    contact: 'Lorem ipsum dolor.',
    location: "Lorem ipsum dolor sit amet.",
    details: "This is longer content Donec id elit non mi porta gravida at eget metus."
  });

  $scope.entries.push({
    offer: false,
    name: "Content goes here.",
    contact: 'Lorem ipsum dolor.',
    location: "Lorem ipsum dolor.",
    details: "This is longer content Donec id elit non mi porta gravida at eget metus."
  });

  $scope.addContent = function(){
    $scope.entries.push({
      offer: false,
      name: "Content goes here.",
      contact: 'Lorem ipsum dolor.',
      location: "Lorem ipsum dolor.",
      details: "This is longer content Donec id elit non mi porta gravida at eget metus."
    });
  };

});